VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsCompress"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'*---------------------------------------------------------------
'*
'* ClassName:      clsCompress
'* FileName:       COMPRESS.CLS
'* Date:           July 1998
'* Author:         Ian M. Weatherburn
'* Company:        Mindkey Software Solutions (Pty) Ltd.
'* Copyright:      Copyright (C) 1998 by Mindkey Software Solutions
'*                 All Rights Reserved
'* Description:    Manage the details of the compressed file
'*---------------------------------------------------------------

Option Explicit

Private strTransferFile As String

Public Property Get CabFileName() As String
  CabFileName = strTransferFile
End Property

Private Function SetCabFileName() As String
  Dim strBranchCode As String
  Dim strFileNumber As String
  Dim strTempDir As String
  Dim strReg As clsOptions
  Set strReg = New clsOptions

  
  strBranchCode = strReg.BranchCode
  
  strFileNumber = CStr(CInt(strReg.FileNumber) + 1)
  strReg.FileNumber = strFileNumber
  
  While Len(strFileNumber) < (8 - Len(strBranchCode))
    strFileNumber = "0" & strFileNumber
  Wend
  
  strTempDir = GetTempDir
  
  SetCabFileName = strTempDir & _
                   strBranchCode & _
                   strFileNumber & _
                   ".CAB"
                   
  Set strReg = Nothing

End Function

Private Sub Class_initialize()

  strTransferFile = SetCabFileName()

End Sub


